JQuery Datatable sDom 配置 |
您所在的位置:网站首页 › datatables sdom › JQuery Datatable sDom 配置 |
阅读更多
用过JQuery Datatable的人都知道,他很强大,也很简单,但是有一个属性的设定总是很模糊,他就是sDom.
官网给的描述是: This initialisation variable allows you to specify exactly where in the DOM you want DataTables to inject the various controls it adds to the page (for example you might want the pagination controls at the top of the table). DIV elements (with or without a custom class) can also be added to aid styling. The follow syntax is used: The following options are allowed: 'l' - Length changing 'f' - Filtering input 't' - The table! 'i' - Information 'p' - Pagination 'r' - pRocessing The following constants are allowed: 'H' - jQueryUI theme "header" classes ('fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix') 'F' - jQueryUI theme "footer" classes ('fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix') The following syntax is expected: '' - div elements '' - div with an ID
拿个例子来看: "sDom": "", 分解一下就是: > 最后的HTML就是: 表格内容 分页栏页面显示如图:
清楚了这个逻辑就感觉简单多了。
![]() ![]() ![]() ![]() |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |